Skip to content

Conversation

@lforst
Copy link
Contributor

@lforst lforst commented Nov 13, 2023

Fixes issues reported in #9461

This will add addTracingExtension() calls to all auto instrumentation wrappers because they will attempt to start transactions and if the tracing extensions are not set the sdk will print an ugly warning.

This is only serverside so bundlesize shouldn't matter here.

@lforst lforst requested review from AbhiPrasad, Lms24 and mydea November 13, 2023 10:52
Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine, maybe we find a way to abstract this away - e.g. can we export a wrapping startTransaction that basically does:

import { startTransaction as _startTransaction, addTracingExtensions } from '@sentry/core';

export function startTransaction() {
  addTracingExtensions();
  return _startTransaction(...arguments);
}

And use this everywhere (or something like this)? Not sure how easy that would be in the next architecture...!

@lforst
Copy link
Contributor Author

lforst commented Nov 13, 2023

@mydea This doesn't seem like a bad idea. Maybe we have these wrappers for our server SDKs.

@lforst lforst merged commit 27686ba into develop Nov 13, 2023
@lforst lforst deleted the lforst-add-tracing-extensions branch November 13, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants